home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / misc / epigram.sty < prev    next >
Text File  |  1993-01-11  |  759b  |  22 lines

  1. %NAME: epigram.sty
  2. % From TeXMaG Volume 2, Number 6
  3. % Don Hosek <DHOSEK@HMCVAX.BITNET>
  4. %
  5. \long\def\epigram#1{% We use \long\def to allow the argument
  6.                     % to span several paragraphs.
  7.     \bigskip       % extra space above.
  8.     \setbox0=\hbox{#1} % put the text into a box
  9.     \ifdim\wd0>\critwidth %check the length
  10.          \centerline{\vtop{\hsize=\episize\noindent#1}}
  11.               % If the length is greater than
  12.               % the critical length, make a
  13.               % displayed paragraph
  14.     \else          % otherwise, we just center the text.
  15.          \centerline{\box0}
  16.     \fi
  17.     \smallskip     % extra space for the end.
  18. }
  19.      
  20. \newdimen\critwidth          \critwidth=.75\hsize
  21. \newdimen\episize            \episize=.6\hsize
  22.